Get Cell Colour
AutomatR.Excel.Activities.GetCellColour
The "Get Cell Colour" activity in AutomatR is part of the Excel activities package, designed to extract the background color of a specific cell and save it as a color variable. This activity facilitates color-related operations within Excel, enhancing the capabilities of automation workflows.
Properties
Name | Description |
---|---|
Input | |
Cell Number | Enter the cell number for which the color hex code is required. String variables containing the cell number (e.g., "A1", "B2"). |
Misc | |
Display Name | The display name of the activity. A display name is automatically generated when you indicate a target. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Get Cell Colour" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Color | Outputs the result of the color fetched from the specified cell. String variables containing the color value in hex format (e.g., "#RRGGBB"). |
How to use:
- Drag and drop the "Get Cell Colour" activity onto the workflow.
- Configure the properties by specifying the cell number for which the color is to be extracted.
- Optionally, configure the delay.
- Execute the workflow to retrieve the color of the specified cell within Excel.
Example: Consider an example where the "Get Cell Colour" activity is used to retrieve the color of cell "A1":
Get Cell Colour:
Cell Number: "A1"
Delay: 2
Color: cellColor
In this example, the activity retrieves the color of cell "A1," and the color value is stored in the string variable "cellColor" for further processing in the workflow.
Note: Ensure that the "Get Cell Colour" activity is placed within an "Excel Root" activity to establish the Excel context for execution.